#ifndef EVENTPOLLER_H
#define EVENTPOLLER_H
#include <vector>
#include "EventHandler.h"
#include "NonCopyable.h"
#include "Singleton.h"

class EventPoller : public NonCopyable
{
private:
	EventPoller(){}
	friend class Singleton<EventPoller>;
public:
	void Update();
	void AddHandler(EventHandler* eh);
	void RemoveHandler(EventHandler* eh);

private:
	typedef std::vector<EventHandler*> Handlers;
	Handlers		m_handlers;
};

typedef Singleton<EventPoller> TheEventPoller;

#endif